package Train
{
	public class BaseTrain
	{
		public static const PASSENGER_TRAIN:uint 	= 0;
		public static const CARGO_TRAIN:uint		= 1;
		
		private var _type:uint;
		private var _trainVMax:Number;
		private var _accel:Number;
		private var _brakeAccel:Number;
		private var _deriveAccel:Number;
		private var _forcedVelocity:Number = -1;
		
		public function BaseTrain()
		{
		}

		public function get forcedVelocity():Number
		{
			return _forcedVelocity;
		}

		public function set forcedVelocity(value:Number):void
		{
			_forcedVelocity = value;
		}

		public function get deriveAccel():Number
		{
			return _deriveAccel;
		}

		public function set deriveAccel(value:Number):void
		{
			_deriveAccel = value;
		}

		public function get brakeAccel():Number
		{
			return _brakeAccel;
		}

		public function set brakeAccel(value:Number):void
		{
			_brakeAccel = value;
		}

		public function get accel():Number
		{
			return _accel;
		}

		public function set accel(value:Number):void
		{
			_accel = value;
		}

		public function get trainVMax():Number
		{
			if (_forcedVelocity == -1)
				return _trainVMax;
			else
				return _forcedVelocity;
		}

		public function set trainVMax(value:Number):void
		{
			_trainVMax = value;
		}

		public function get type():uint
		{
			return _type;
		}

		public function set type(value:uint):void
		{
			_type = value;
		}

	}
}